!function(){"use strict";void 0===window.currentZoom&&(window.currentZoom=1),window.sectionHeaders||(window.sectionHeaders=[]),window.updateSectionHeaders||(window.updateSectionHeaders=function(){return window.sectionHeaders=Array.from(document.querySelectorAll(".section h2")),window.sectionHeaders}),window.receiveContent||(window.receiveContent=function(e){try{if(!e)return void console.error("No content provided to receiveContent");console.log("📊 Content received, parsing...");const n=document.querySelector(".msd-container");if(n&&(n.innerHTML=""),document.body&&(document.body.style.width="auto"),"function"==typeof parseMsdToAst){const n=parseMsdToAst(e);"function"==typeof renderSequenceFromAst?(renderSequenceFromAst(n),setTimeout(()=>{window.updateSectionHeaders&&window.updateSectionHeaders(),document.body&&(document.body.style.width=document.body.scrollWidth+"px")},100)):console.error("renderSequenceFromAst function not found")}else console.error("parseMsdToAst function not found")}catch(e){console.error("Error rendering sequence diagram from AST:",e)}}),void 0===window.canvasInstance&&(window.canvasInstance=null),"function"==typeof window.setupClickHandlers||(window.setupClickHandlers=function(e){e.querySelectorAll("[data-line-index]").forEach(e=>{e.addEventListener("click",function(e){const n=parseInt(this.getAttribute("data-line-index"),10);isNaN(n)||"function"==typeof window.highlightLineInEditor&&window.highlightLineInEditor(n)})})}),console.log("✅ WebView initialization complete")}();